import service from "@/utils/fetch";
const post = {
  //查询商户账号分页
  tenantAccount_list(params) {
    return service({
      method: "get",
      data: params,
      url: "/api/tenantAccount",
    });
  },

  // 新增商户账号
  tenantAccount_add(params) {
    return service({
      method: "post",
      data: params,
      url: "/api/tenantAccount",
    });
  },

  // 编辑商户账号
  tenantAccount_edit(params) {
    return service({
      method: "put",
      data: params,
      url: "/api/tenantAccount",
    });
  },

  // 删除商户账号
  tenantAccount_delete(ids) {
    return service({
      method: "delete",
      data: ids,
      url: "/api/tenantAccount",
    });
  },

  //   商户账号设为默认
  tenantAccount_setDefault(id) {
    return service({
      method: "post",
      data: {id},
      url: `/api/tenantAccount/default/${id}`,
    });
  },
};

export default post;
